/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.gameai.tickettoride.core;

import playn.core.GroupLayer;
import playn.core.Image;
import playn.core.PlayN.*;

/**
 *
 * @author Christopher
 */
public class DestCard extends Card {

    
    
    private City[] end_points;
    private int score;
    private boolean completed = false;
    public Image IMAGE;
    
    public DestCard(int val) {
        super(val);
        
        switch(val) {
            case 0:
                end_points = new City[]{tickettoride.getGraph().LosAngeles, tickettoride.getGraph().NewYork};
                score = 21;
                break;
            case 1:
                end_points = new City[]{tickettoride.getGraph().Duluth, tickettoride.getGraph().Houston};
                score = 8;
                break;
            case 2:
                end_points = new City[]{tickettoride.getGraph().SaultStMarie, tickettoride.getGraph().Nashville};
                score = 8;
                break;
            case 3:
                end_points = new City[]{tickettoride.getGraph().NewYork, tickettoride.getGraph().Atlanta};
                score = 6;
                break;
            case 4:
                end_points = new City[]{tickettoride.getGraph().Portland, tickettoride.getGraph().Nashville};
                score = 17;
                break;
            case 5:
                end_points = new City[]{tickettoride.getGraph().Vancouver, tickettoride.getGraph().Montreal};
                score = 20;
                break;
            case 6:
                end_points = new City[]{tickettoride.getGraph().Duluth, tickettoride.getGraph().ElPaso};
                score = 10;
                break;
            case 7:
                end_points = new City[]{tickettoride.getGraph().Toronto, tickettoride.getGraph().Miami};
                score = 10;
                break;
            case 8:
                end_points = new City[]{tickettoride.getGraph().Portland, tickettoride.getGraph().Phoenix};
                score = 11;
                break;
            case 9:
                end_points = new City[]{tickettoride.getGraph().Dallas, tickettoride.getGraph().NewYork};
                score = 11;
                break;
            case 10:
                end_points = new City[]{tickettoride.getGraph().Calgary, tickettoride.getGraph().SaltLake};
                score = 7;
                break;
            case 11:
                end_points = new City[]{tickettoride.getGraph().Calgary, tickettoride.getGraph().Phoenix};
                score = 13;
                break;
            case 12:
                end_points = new City[]{tickettoride.getGraph().LosAngeles, tickettoride.getGraph().Miami};
                score = 20;
                break;
            case 13:
                end_points = new City[]{tickettoride.getGraph().Winnepeg, tickettoride.getGraph().LittleRock};
                score = 11;
                break;
            case 14:
                end_points = new City[]{tickettoride.getGraph().SanFrancisco, tickettoride.getGraph().Atlanta};
                score = 17;
                break;
            case 15:
                end_points = new City[]{tickettoride.getGraph().Kansas, tickettoride.getGraph().Houston};
                score = 5;
                break;
            case 16:
                end_points = new City[]{tickettoride.getGraph().LosAngeles, tickettoride.getGraph().Chicago};
                score = 16;
                break;
            case 17:
                end_points = new City[]{tickettoride.getGraph().Denver, tickettoride.getGraph().Pittsburgh};
                score = 11;
                break;
            case 18:
                end_points = new City[]{tickettoride.getGraph().Chicago, tickettoride.getGraph().SantaFe};
                score = 9;
                break;
            case 19:
                end_points = new City[]{tickettoride.getGraph().Vancouver, tickettoride.getGraph().SantaFe};
                score = 13;
                break;
            case 20:
                end_points = new City[]{tickettoride.getGraph().Boston, tickettoride.getGraph().Miami};
                score = 12;
                break;
            case 21:
                end_points = new City[]{tickettoride.getGraph().Chicago, tickettoride.getGraph().NewOrleans};
                score = 7;
                break;
            case 22:
                end_points = new City[]{tickettoride.getGraph().Montreal, tickettoride.getGraph().Atlanta};
                score = 9;
                break;
            case 23:
                end_points = new City[]{tickettoride.getGraph().Seattle, tickettoride.getGraph().NewYork};
                score = 22;
                break;
            case 24:
                end_points = new City[]{tickettoride.getGraph().Denver, tickettoride.getGraph().ElPaso};
                score = 4;
                break;
            case 25:
                end_points = new City[]{tickettoride.getGraph().Helena, tickettoride.getGraph().LosAngeles};
                score = 8;
                break;
            case 26:
                end_points = new City[]{tickettoride.getGraph().Winnepeg, tickettoride.getGraph().Houston};
                score = 12;
                break;
            case 27:
                end_points = new City[]{tickettoride.getGraph().Montreal, tickettoride.getGraph().NewOrleans};
                score = 13;
                break;
            case 28:
                end_points = new City[]{tickettoride.getGraph().SaultStMarie, tickettoride.getGraph().Oklahoma};
                score = 9;
                break;
            case 29:
                end_points = new City[]{tickettoride.getGraph().Seattle, tickettoride.getGraph().LosAngeles};
                score = 9;
                break;
        }
    }
    
    public City[] getDestCities() {
        return end_points;
    }
    
    public int getScore() {
        return score;
    }
    
    public void setCompleted(){
        completed = true;
    }
    
    @Override
    public String toString() {
        return end_points.toString();
    }
    
}

/* Route Reference
0. Los Angeles to New York City (21)
1. Duluth to Houston (8)
2. Sault Ste Marie to Nashville (8)
3. New York to Atlanta (6)
4. Portland to Nashville (17)
5. Vancouver to Montréal (20)
6. Duluth to El Paso (10)
7. Toronto to Miami (10)
8. Portland to Phoenix (11)
9. Dallas to New York City (11)
10. Calgary to Salt Lake City (7)
11. Calgary to Phoenix (13)
12. Los Angeles to Miami (20)
13. Winnipeg to Little Rock (11)
14. San Francisco to Atlanta (17)
15. Kansas City to Houston (5)
16. Los Angeles to Chicago (16)
17. Denver to Pittsburgh (11)
18. Chicago to Santa Fe (9)
19. Vancouver to Santa Fe (13)
20. Boston to Miami (12)
21. Chicago to New Orleans (7)
22. Montreal to Atlanta (9)
23. Seattle to New York (22)
24. Denver to El Paso (4)
25. Helena to Los Angeles (8)
26. Winnipeg to Houston (12)
27. Montreal to New Orleans (13)
28. Sault Ste. Marie to Oklahoma City (9)
29. Seattle to Los Angeles (9)
*/